require('../less/commcss/animate.css')
require('../less/advert.less')


//窗口加载事件  

document.ready(function(){
    


    //获取显示时间的标签
    const time=document.querySelector('#time')

    // 时间初始值
    let countDown=5
    time.textContent=countDown+'s'

    // 开启定时器
    let timer=setInterval(function(){
        // 先自减1
        countDown--;

        if(countDown<1){
            clearInterval(timer)
            window.location.href='./login.html'
        }else{
            /* 与innerHTML一样但框架都用textContent */
            time.textContent=countDown+'s'
        }
    },1000)

   
})